package com.cn.zy;

import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Queue;

/**
 * @author: zhangyi
 * @date: 2018/12/18 21:23
 * @description:
 */
public class JucDemo {

    public static void main(String[] args) {
        Queue<Object> objects = Collections.asLifoQueue(new ArrayDeque<>());
        objects.add(1);
        objects.add(2);
        objects.add(3);
        Object peek = objects.peek();
        System.out.println(peek+"----------------");
        while(objects.size() != 0) {
            System.out.println(objects.poll());
        }
    }
}

